package o;

import android.app.Application;

public class dgi {
    private static dgi ˊ = null;
    private dgg ˎ = null;
    private Application ॱ = null;

    public static synchronized dgi ˏ() {
        dgi o_dgi;
        synchronized (dgi.class) {
            if (ˊ == null) {
                ˊ = new dgi();
            }
            o_dgi = ˊ;
        }
        return o_dgi;
    }

    public void ˎ(Application application) {
        if (application == null) {
            Logger.e("ActivityLifecycleManager", "init error:the param app is null");
            return;
        }
        this.ॱ = application;
        if (this.ˎ == null) {
            this.ˎ = new dgg();
            this.ॱ.registerActivityLifecycleCallbacks(this.ˎ);
        }
    }

    public void ˎ() {
        if (this.ॱ == null) {
            Logger.e("ActivityLifecycleManager", "release error:the param app is null");
        } else if (this.ˎ != null) {
            this.ॱ.unregisterActivityLifecycleCallbacks(this.ˎ);
            this.ˎ = null;
        }
    }
}
